package com.wgworkshop.pems.model;

import com.wgworkshop.pems.checkgroup.CreateCheckGroup;
import com.wgworkshop.pems.checkgroup.PatchCheckGroup;
import com.wgworkshop.pems.checkgroup.UpdateCheckGroup;
import com.wgworkshop.pems.common.enums.ClassArrangeStatusEnum;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.util.Date;

/**
 * 班级安排模型。
 * Created by wlc on 2017/10/11.
 */
public class ClassArrangeModel {
    @Null(message = "班级安排ID只能为null。",
            groups = {CreateCheckGroup.class, PatchCheckGroup.class})
    @NotNull(message = "班级安排ID不能为null。",
            groups = UpdateCheckGroup.class)
    @Min(value = 1,
            message = "不正确的班级安排ID[${validatedValue}]。",
            groups = UpdateCheckGroup.class)
    private Long id;
    @NotNull(message = "学生ID不能为null。",
            groups = {CreateCheckGroup.class, UpdateCheckGroup.class})
    @Min(value = 1,
            message = "不正确的学生ID[${validatedValue}]。",
            groups = {CreateCheckGroup.class, UpdateCheckGroup.class, PatchCheckGroup.class})
    private Long studentId;
    @NotNull(message = "开始上课日期不能为null。",
            groups = {CreateCheckGroup.class, UpdateCheckGroup.class})
    private Date startDate;
    @NotNull(message = "班级编号不能为null。",
            groups = {CreateCheckGroup.class, UpdateCheckGroup.class})
    @Min(value = 0,
            message = "不正确的班级编号[${validatedValue}]，班级编号最小值为{value}。",
            groups = {CreateCheckGroup.class, UpdateCheckGroup.class, PatchCheckGroup.class})
    @Max(value = 255,
            message = "不正确的班级编号[${validatedValue}]，班级编号最大值为{value}。",
            groups = {CreateCheckGroup.class, UpdateCheckGroup.class, PatchCheckGroup.class})
    private Integer classNum;
    private ClassArrangeStatusEnum status;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Integer getClassNum() {
        return classNum;
    }

    public void setClassNum(Integer classNum) {
        this.classNum = classNum;
    }

    public ClassArrangeStatusEnum getStatus() {
        return status;
    }

    public void setStatus(ClassArrangeStatusEnum status) {
        this.status = status;
    }
}
